Version

FromBrush(LinearGradientBrush,Nullable<Point>,Nullable<Point>) Method

Returns a Infragistics.Win.DataVisualization.LinearGradientBrush instance initialized from the specified System.Drawing.Drawing2D.LinearGradientBrush instance.
Syntax
'Declaration
 
Public Shared Function FromBrush( _
   ByVal brush As LinearGradientBrush, _
   Optional ByVal startPoint As Nullable(Of Point), _
   Optional ByVal endPoint As Nullable(Of Point) _
) As LinearGradientBrush

Parameters

brush
The System.Drawing.Drawing2D.LinearGradientBrush instance from which to initialize the new Infragistics.Win.DataVisualization.LinearGradientBrush instance
startPoint
The start point for the gradient, or null if the default start point should be used (0, 0).
endPoint
The end point for the gradient, or null if the default end point should be used (1, 0).

Return Value

A Infragistics.Win.DataVisualization.LinearGradientBrush instance.
Remarks

The startPoint and endPoint parameters are necessary because the System.Drawing.Drawing2D.LinearGradientBrush class does not expose these values as public properties.

In the absence of an explicit setting, the startPoint and endPoint default to the values (0, 0) and (1, 0), respectively, which causes the gradient to progress along the horizontal plane from left to right.

The startPoint and endPoint parameters are used to specify the angle of the gradient. For example, given a startPoint of (0, 0) and an endPoint of (1, 1), the resulting angle is 45 degrees, producing a gradient which progresses in the forward diagonal direction.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also